﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace Mvc3Blog.Models
{
    public class Post
    {
        public virtual int Id { get; private set; }

        [Required(ErrorMessage = "Title is required.")]
        public virtual string Title { get; set; }

        [Required(ErrorMessage = "Body is requried.")]
        public virtual string Body { get; set; }

        public virtual string Tags { get; set; }

        [Required(ErrorMessage = "Created By is required.")]
        public virtual string CreatedBy { get; set; }

        public virtual DateTime CreatedOn { get; set; }
    }
}